package com.hzyb.shopHotSearch.dao;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.hzyb.shopHotSearch.model.ShopHotSearch;
@Repository
@Transactional
public interface ShopHotSearchDao extends CrudRepository<ShopHotSearch, String>{
	@Query(value="select distinct index from ShopHotSearch")
	public List<String> getAllIndex();
	
	public List<ShopHotSearch> findByIndex(String index,Sort sort);

}
